<!--3.处理URL，获取参数，写入session-->
<?php

session_start();
//接受url中的参数
$mid = $_GET['mid'];
$did = $_GET['did'];
$d_did = "d" . $did;
//$dname = $_GET['dname'];

//写入session

$_SESSION[$d_did] = $did;
$_SESSION['flag'] = isset($_SESSION['flag']) ? $_SESSION['flag'] + 1 : 1;

echo "加购成功<br>";

?>
<hr>
<a href=merchant.php?mid=<?php echo $mid ?>>继续购物</a>
<br>
<a href=cart.php>查看餐车</a>